package com.forum.pojo.vo;

import com.forum.pojo.ForumArticle;

import java.util.Arrays;

/**
 * @ClassName FormArticleDetailVO
 * @Description TODO
 * @Author suyao
 * @Version 1.0
 */
public class ForumArticleDetailVo {
    private ForumArticle forumArticle;

    private String[] attachmentUrls;

    private String avatarUrl;

    private Integer identity;

    public Integer getIdentity() {
        return identity;
    }

    public void setIdentity(Integer identity) {
        this.identity = identity;
    }

    public ForumArticleDetailVo(ForumArticle forumArticle, String[] attachmentUrls, String avatarUrl,Integer identity) {
        this.forumArticle = forumArticle;
        if(forumArticle.getAnswer()==null)
            forumArticle.setAnswer("");
        this.attachmentUrls = attachmentUrls;
        this.identity=identity;
        this.avatarUrl = avatarUrl;
    }

    public ForumArticleDetailVo() {
    }

    public ForumArticle getForumArticle() {
        return forumArticle;
    }

    public void setForumArticle(ForumArticle forumArticle) {
        this.forumArticle = forumArticle;
    }

    public String[] getAttachmentUrls() {
        return attachmentUrls;
    }

    public void setAttachmentUrls(String[] attachmentUrls) {
        this.attachmentUrls = attachmentUrls;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    @Override
    public String toString() {
        return "FormArticleDetailVO{" +
                "forumArticle=" + forumArticle +
                ", attachmentUrls=" + Arrays.toString(attachmentUrls) +
                ", avatarUrl='" + avatarUrl + '\'' +
                '}';
    }
}
